//
//  Quake Entity Set for Qoole
//  By Matt Ayres
//

class "Ammo"
class "Armor"
class "Info"
class "Item"
class "Light"
class "Monster"
class "Misc"
class "Player"
class "Sound"
class "Weapon"
class "Func"
class "Trigger"

typedef "worldtypes"
{
	0	"Medieval (medieval)"
	1	"Runic (metal)"
	2	"Present (base)"
}

entity "worldspawn" "Null->Worldspawn" "entire map"
{
	"wad"		str		"Texture wad file to use for this map"
	"message"	str		"The title of the level"
	"worldtype"	worldtypes	"Describes time of environment (changes appearance/name of keys)"
	"sounds"	int		"Tells the CD player which track to play."
	"light"		int		"Default light level"
	model
}

entity "air_bubbles" "Misc->Air Bubbles" "Rising bubbles"
{
	"origin"	notuser
}

// -------------------------------------------------------------------------
// ambient sounds

entity "ambient_comp_hum" "Sound->Comp Hum" "Computer background sounds"
{
	"origin"	notuser
}

entity "ambient_drip" "Sound->Drip" "Dripping sound"
{
	"origin"	notuser
}

entity "ambient_drone" "Sound->Drone" "Engine/machinery sound"
{
	"origin"	notuser
}

entity "ambient_fluoro_buzz" "Sound->Fluoro_Buzz" "Flourescent buzzing sound"
{
	"origin"	notuser
}

entity "ambient_light_buzz" "Sound->Light Buzz" "Buzzing sound from light"
{
	"origin"	notuser
}

entity "ambient_suck_wind" "Sound->Suck Wind" "Wind sound"
{
	"origin"	notuser
}

entity "ambient_swamp1" "Sound->Frogs" "Frogs croaking"
{
	"origin"	notuser
}

entity "ambient_swamp2" "Sound->Frogs 2" "Slightly different sounding frogs croaking"
{
	"origin"	notuser
}

entity "ambient_thunder" "Sound->Thunder" "Thunder sound"
{
	"origin"	notuser
}


// -------------------------------------------------------------------------
// events

entity "event_lightning" "Misc->Event Lightning" "Lightning (Used to kill Cthon, shareware boss)"
{
}


// -------------------------------------------------------------------------
// funcs

typedef "button_sounds"
{
	1	"Steam Metal"
	2	"Wooden Chunk"
	3	"Metallic Click"
	4	"In-Out"
}

entity "func_bossgate" "Func->Boss Gate" "Entity appears unless player has all four sigils"
{
	"targetname"	str		""
	model
}

entity "func_button" "Func->Button" "A button"
{
	"angle"		int		"Angle button moves?"
	"speed"		int		"Speed it moves in?"
	"health"	int		"If there is health, button is shootable"
	"killtarget"	int		"Kills target when activated"
	"lip"		int		"Amount button sticks out when activated (default:4)"
	"sounds"	button_sounds	"Sound it makes when activated"
	"wait"		int		"Wait until retrigger? (-1 stays pressed)"
	"delay"		int		"Delay before action is triggered"
	"targetname"	str		""
	"target"	str		"Trigger name of target entity"
	model
}

entity "func_dm_only" "Func->DM Only" "A teleporter that only appears in deathmatch"
{
	"targetname"	str		""
	model
}

typedef "door_sounds"
{
	0		"no sound"
	1		"stone"
	2		"base"
	3		"stone chain"
	4		"screechy metal"
}

flagdef "door_spawnflags"
{
	1		"door waits in both open and closed states for trigger"
	2		"door starts open; when triggered, closes"
	4		"does not link action to multiple door brushes?"
	8		"door requires a gold key to open"
	16		"door requires a silver key to open"
}

entity "func_door" "Func->Door" "Door"
{
	"angle"		int		"opening angle"
	"speed"		int (100)	"speed of movement (100 default)(optional)"
	"sounds"	door_sounds (1)	"sound it makes"
	"wait"		int (3)		"delay before closing (3 default, -1 never return) (optional)"
	"spawnflags"	door_spawnflags	"Flags describing the object (optional)"
	"lip"		int (8)		"amount remaining at end of move (8 default) (optional)"
	"message"	str		"message printed if door is opened by trigger"
	"health"	int		"if set, door must be shot open"
	"dmg"		int		"damage inflicted on blocking entities"
	"targetname"	str		"Door's trigger name (optional)"
	model
}

flagdef "door_secret_spawnflags"
{
	1		"Once open, stays open"
	2		"First move is left of arrow"
	4		"First move is down from arrow"
	8		"Only opened by trigger"
	16		"Even if targeted, keep shootable"
}

entity "func_door_secret" "Func->Door Secret" "A door that is triggered to open"
{
	"angle"		int		"Angle it moves when activated"
	"speed"		int (100)	"Speed of movement"
	"sounds"	door_sounds (1)	"Sound it makes"
	"wait"		int (3)		"Delay before closing"
	"spawnflags"	door_secret_spawnflags	"Flags describing the object (optional)"
	"lip"		int (8)		"Some kind of offset (optional)"
	"targetname"	str		"Door's trigger name"
	model
}

entity "func_episodegate" "Func->Episode Gate" "Entity appears if player has appropriate episode sigil"
{
	"e1"		1		"Appears if player has Episode 1 sigil"
	"e2"		2		"Appears if player has Episode 2 sigil"
	"e3"		3		"Appears if player has Episode 3 sigil"
	"e4"		4		"Appears if player has Episode 4 sigil"
	"targetname"	str		""
	model
}

entity "func_illusionary" "Func->Illusionary" "Creates brush that appears solid, but isn't"
{
	"targetname"	str		""
	model
}

typedef "plat_sounds"
{
	1	"base fast"
	2	"chain slow"
}

entity "func_plat" "Func->Platform" "A lift/elevator"
{
	"height"	int		"Determines amount plat moves manually (optional)"
	"speed"		int (150)	"Moving speed (default:150)"
	"sounds"	int		"Sound it makes (optional)"
	"targetname"	str		""
	model
}

entity "func_train" "Func->Train" "A platform (moves along a 'train')"
{
	"sounds"	int (1)		"Sound it makes when activated"
	"speed"		int (100)	"Speed at which it moves (default:100)"
	"dmg"		int (2)		"Damage done on crush (default:2)"
	"targetname"	str		"Its trigger name"
	"target"	str		"Trigger name of its first path_corner destination"
	model
}

entity "func_wall" "Func->Wall" "Changes texture to alternate texture when triggered"
{
	"targetname"	str		""
	model
}


// -------------------------------------------------------------------------
// infos

entity "info_intermission" "Info->Intermission (Camera)" "Cameras positioning for intermission (?)"
{
	"origin"	notuser
	"mangle"	notuser
	"targetname"	str
}

entity "info_notnull" "Info->Notnull (Light Target)" "Used as a positional target for lighting (does not remove itself)"
{
	"origin"	notuser
	"angle"		notuser
	"targetname"	str
}

entity "info_null" "Info->Null (Light Target)" "Used as a positional target for spotlights (removes itself)"
{
	"origin"	notuser
	"angle"		notuser
	"targetname"	str
}

entity "info_teleport_destination" "Info->Teleport Destination" "Gives coords for a teleport destination using a targetname"
{
	"origin"	notuser
	"angle"		notuser
	"angle"		int	"Angle the player will face upon leaving teleport."
	"targetname"	str	"Teleport's trigger name."
}


// -------------------------------------------------------------------------
// ammo

flagdef "item_spawnflags"
{
	1		"Big"
}

entity "item_shells" "Ammo->Shells" "Ammo for both Shotgun and SuperShotgun"
{
	"origin"	notuser
	"angle"		notuser
	"spawnflags"	item_spawnflags
}

entity "item_spikes" "Ammo->Spikes" "Ammo for Perforator and Super Perforator"
{
	"origin"	notuser
	"angle"		notuser
	"spawnflags"	item_spawnflags
}

entity "item_rockets" "Ammo->Rockets" "Ammo for Rocket/Grenade Launcher"
{
	"origin"	notuser
	"angle"		notuser
	"spawnflags"	item_spawnflags
}

entity "item_cells" "Ammo->Cells" "Ammo for the Thunderbolt"
{
	"origin"	notuser
	"angle"		notuser
	"spawnflags"	item_spawnflags
}

// -------------------------------------------------------------------------
// player

entity "info_player_start" "Player->Start" "Main player starting point (only one allowed)"
{
	"origin"	notuser
	"angle"		notuser
}

entity "info_player_deathmatch" "Player->Deathmatch" "A deathmatch start (more than one allowed)"
{
	"origin"	notuser
	"angle"		notuser
}

entity "info_player_coop" "Player->Coop" "A coop player start (more than one allowed)"
{
	"origin"	notuser
	"angle"		notuser
}

entity "info_player_start2" "Player->Start 2" "Return point from episode"
{
	"origin"	notuser
	"angle"		notuser
}

// -------------------------------------------------------------------------
// items

entity "item_armor1" "Armor->Green (100%)" "Green armor"
{
	"origin"	notuser
}

entity "item_armor2" "Armor->Yellow (150%)" "Yellow armor"
{
	"origin"	notuser
}

entity "item_armorInv" "Armor->Red (200%)" "Red armor"
{
	"origin"	notuser
}

entity "item_artifact_envirosuit" "Item->Envirosuit" "Environmental Protection Suit"
{
	"origin"	notuser
}

entity "item_artifact_invisibility" "Item->Invisibility Ring" "Ring of Shadows (Invisibility)"
{
	"origin"	notuser
}

entity "item_artifact_invulnerability" "Item->Invulnerability Pentagram" "Penkeyram of Protection"
{
	"origin"	notuser
}

entity "item_artifact_super_damage" "Item->Quad Damage" "Quad Damage"
{
	"origin"	notuser
}

flagdef "health_spawnflags"
{
	1		"Rotten (15%)"
	2		"Mega (100%)"
}

entity "item_health" "Item->Health" "Medkit"
{
	"origin"	notuser
	"angle"		notuser
	"spawnflags"	health_spawnflags
}

entity "item_key1" "Item->Silver Key" "Silver Key"
{
	"origin"	notuser
//	"angle"		notuser
}

entity "item_key2" "Item->Gold Key" "Gold Key"
{
	"origin"	notuser
//	"angle"		notuser
}

entity "item_sigil" "Item->Sigil" "Sigil (a rune)"
{
	"origin"	notuser
	"angle"		notuser
}

entity "item_weapon" "Null->Weapon" "Generic weapon class - DO NOT USE"
{
	"origin"	notuser
	"angle"		notuser
}


// -------------------------------------------------------------------------
// lights

flagdef "light_flags"
{
	1		"Light starts off.  Switches on when triggered."
}

typedef "light_style"
{
	0	"normal"
	1	"flicker (first variety)"
	2	"slow strong pulse"
	3	"candle (first variety)"
	4	"fast strobe"
	5	"gentle pulse"
	6	"flicker (second variety)"
	7	"candle (second variety)"
	8	"candle (third variety)"
	9	"slow strobe"
	10	"flourescent flicker"
	11	"slow pulse, not fading to black"
}

entity "light" "Light->Light" "A projected light.  No visible lightsource."
{
	"origin"	notuser
	"light"		int (300)	"Tells how bright the light is"
	"style"		light_style 	"How the light appears"
	"spawnflags"	light_flags 	"State light starts in"
	"target"	str 		"What the light points at"
	"targetname"	str 		"Target id of the light"
}

entity "light_fluoro" "Light->Fluoro" "A projected light.  No visible lightsource.  Makees humming sound."
{
	"origin"	notuser
	"light"		int (300)	"Tells how bright the light is"
	"style"		light_style 	"How the light appears"
	"spawnflags"	light_flags 	"State light starts in"
	"targetname"	str 		"Target id of the light"
}

entity "light_fluorospark" "Light->Fluorospark" "A projected light.  No visible lightsource.  Makes broken, sparking sound."
{
	"origin"	notuser
	"light"		int (300)	"Tells how bright the light is"
	"style"		light_style 	"How the light appears"
	"spawnflags"	light_flags 	"State light starts in"
	"targetname"	str 		"Target id of the light"
}

entity "light_globe" "Light->Globe" "Light that appears as a globe sprite."
{
	"origin"	notuser
	"light"		int (300)	"Tells how bright the light is"
	"style"		light_style 	"How the light appears"
	"spawnflags"	light_flags 	"State light starts in"
	"targetname"	str 		"Target id of the light"
}

entity "light_torch_small_walltorch" "Light->Torch Small Walltorch" "Small wall torch (gives off light)"
{
	"origin"	notuser
	"light"		int (300)	"Tells how bright the light is"
	"style"		light_style 	"How the light appears"
	"spawnflags"	light_flags 	"State light starts in"
	"targetname"	str 		"Target id of the light"
}

entity "light_flame_large_yellow" "Light->Flame Large Yellow" "Large yellow fire (gives off light)"
{
	"origin"	notuser
	"light"		int (300)	"Tells how bright the light is"
	"spawnflags"	light_flags 	"State light starts in"
}

entity "light_flame_small_yellow" "Light->Flame Small Yellow" "Small yellow fire (gives off light)"
{
	"origin"	notuser
	"light"		int (300)	"Tells how bright the light is"
	"spawnflags"	light_flags 	"State light starts in"
}

entity "light_flame_small_white" "Light->Flame Small White" "Small white fire  (gives off light)"
{
	"origin"	notuser
	"light"		int (300)	"Tells how bright the light is"
	"spawnflags"	light_flags 	"State light starts in"
}


// -------------------------------------------------------------------------
// monsters

flagdef "monster_spawnflags"
{
	1		"Monster only wakes up on sight (ambush)"
}

entity "monster_army" "Monster->Army" "Grunt (30HP)"
{
	"origin"	notuser
	"angle"		notuser
	"spawnflags"	monster_spawnflags
}

entity "monster_boss" "Monster->Boss" "Cthon - only can be killed by event_lightning"
{
	"origin"	notuser
	"angle"		notuser
	"spawnflags"	monster_spawnflags
}

entity "monster_demon1" "Monster->Demon" "Fiend [Demon] (300HP)"
{
	"origin"	notuser
	"angle"		notuser
	"spawnflags"	monster_spawnflags
}

entity "monster_dog" "Monster->Dog" "Attack dog (25HP)"
{
	"origin"	notuser
	"angle"		notuser
	"spawnflags"	monster_spawnflags
}

entity "monster_enforcer" "Monster->Enforcer" "Enforcer (80HP)"
{
	"origin"	notuser
	"angle"		notuser
	"spawnflags"	monster_spawnflags
}

entity "monster_fish" "Monster->Fish" "Rotfish (25HP)"
{
	"origin"	notuser
	"angle"		notuser
	"spawnflags"	monster_spawnflags
}

entity "monster_hell_knight" "Monster->Hell Knight" "Hell Knight (250HP)"
{
	"origin"	notuser
	"angle"		notuser
	"spawnflags"	monster_spawnflags
}

entity "monster_knight" "Monster->Knight" "Knight (75HP)"
{
	"origin"	notuser
	"angle"		notuser
	"spawnflags"	monster_spawnflags
}

entity "monster_ogre" "Monster->Ogre" "Ogre (200HP)"
{
	"origin"	notuser
	"angle"		notuser
	"spawnflags"	monster_spawnflags
}

entity "monster_ogre_marksman" "Monster->Ogre Marksman" "Ogre [synonymous with monster_ogre] (200HP)"
{
	"origin"	notuser
	"angle"		notuser
	"spawnflags"	monster_spawnflags
}

entity "monster_oldone" "Monster->Oldone" "Shubb-Niggurath (40000HP) - requires a misc_teleportrain and an info_intermission"
{
	"origin"	notuser
	"angle"		notuser
	"spawnflags"	monster_spawnflags
}

entity "monster_shalrath" "Monster->Shalrath" "Shalrath [Vore] (400HP)"
{
	"origin"	notuser
	"angle"		notuser
	"spawnflags"	monster_spawnflags
}

entity "monster_shambler" "Monster->Shambler" "Shambler (600HP) - rockets 1/2 damage"
{
	"origin"	notuser
	"angle"		notuser
	"spawnflags"	monster_spawnflags
}

entity "monster_tarbaby" "Monster->Tarbaby" "Spawn [Tarbaby] (80HP)"
{
	"origin"	notuser
	"angle"		notuser
	"spawnflags"	monster_spawnflags
}

entity "monster_wizard" "Monster->Wizard" "Scragg [Wizard] (80HP)"
{
	"origin"	notuser
	"angle"		notuser
	"spawnflags"	monster_spawnflags
}

flagdef "monster_spawnflags_zombie"
{
	1		"Crucified Zombie"
	2		"Monster only wakes up on sight"
}

entity "monster_zombie" "Monster->Zombie" "Zombie (60HP)"
{
	"origin"	notuser
	"angle"		notuser
	"spawnflags"	monster_spawnflags_zombie	""
}


// -------------------------------------------------------------------------
// misc

entity "misc_explobox" "Misc->Expode Box" "Large Nuclear Container"
{
	"origin"	notuser
	"angle"		notuser
}

entity "misc_explobox2" "Misc->Explode Box 2" "Small Nuclear Container"
{
	"origin"	notuser
	"angle"		notuser
}

entity "misc_fireball" "Misc->Fireball" "Small fireball (gives off light, harms player)"
{
	"origin"	notuser
	"angle"		notuser
	"speed"		int (300)	"Tells how fast the fireball moves"
}

entity "misc_noisemaker" "Misc->Noisemaker" "Makes lots of sounds (not very useful)"
{
	"origin"	notuser
	"angle"		notuser
	"targetname"	str		""
}

entity "misc_teleporttrain" "Misc->Teleport Train" "Spiked ball needed to telefrag monster_oldone"
{
	"origin"	notuser
	"angle"		notuser
	"targetname"	str		""
}

entity "noclass" "Misc->No Class" "Prints a warning message when spawned and removes itself"
{
	"origin"	notuser
	"angle"		notuser
	"targetname"	str		""
}

entity "path_corner" "Misc->Path Corner" "Used to define path of func_train platforms and of monsters"
{
	"origin"	notuser
	"angle"		notuser
	"targetname"	str		"Its trigger name"
	"target"	str		"Trigger name of next path_corner"
	"wait"		int		"Wait time"
}

entity "test_fodder" "Null->Test Fodder" "Testing only - DO NOT USE"
{
}

entity "test_teleport" "Null->Test Teleport" "Teleporter Testing - DO NOT USE"
{
}

flagdef "shooter_flags"
{
	1		"Fires large spikes"
	2		"Fires lasers"
}

entity "trap_shooter" "Misc->Trap Shooter" "Fires nails without needing to be triggered."
{
	"origin"	notuser
	"angle"		int		"Angle the trap fires at"
	"wait"		int		"Time between shots"
	"spawnflags"	shooter_flags	""
	"nextthink"	float		"Delay before firing first spike (so shots can be skeygered)"
}

entity "trap_spikeshooter" "Misc->Spikes Shooter" "Shoots spikes (nails)"
{
	"origin"	notuser
	"angle"		int		"Angle the trap fires at"
	"wait"		int		"Time between shots"
	"spawnflags"	shooter_flags	""
	"nextthink"	float		"Delay before firing first spike (so shots can be skeygered)"
	"targetname"	str		"Its trigger name"
}

// -------------------------------------------------------------------------
// triggers

flagdef "changelevel_flags"
{
	1		"Skip intermission screen"
}

entity "trigger_changelevel" "Trigger->Change Level" "Changes to another level"
{
	"map"		string		"Map to change to on trigger; if not present, map is restarted"
	"spawnflags"	changelevel_flags ""
	model
}

flagdef "nomessage"
{
	1	"Display no message when triggered"
}

entity "trigger_counter" "Trigger->Counter" "Triggers action after it has been triggered count times."
{
	"targetname"	str		"Its trigger name"
	"target"	str		"Trigger name of its target"
	"count"		int		"Decrements on each trigger.  When 0 activates target."
	"wait"		int		"Required delay before retrigger"
	"delay"		int		"Delay before action is triggered"
	"spawnflags"	nomessage	""
	model
}

entity "trigger_hurt" "Trigger->Hurt" "Hurts whatever touches the trigger"
{
	"dmg"		int	"Damage done to touching entity"
	"target"	str		"Trigger name of target"
	model
}

entity "trigger_monsterjump" "Trigger->Monster Jump" "Causes triggering monster to jump in a direction"
{
	"target"	str		"Trigger name of target"
	model
}

typedef "multiple_sounds"
{
	1	"Secret Sound"
	2	"Beep Beep"
}

flagdef "notouch"
{
	1	"Only allow entities to trigger"
}

entity "trigger_multiple" "Trigger->Multiple" "Triggers action (can be retriggered)"
{
	"killtarget"	str		"Kills something [for triggering monster events] (optional)"
	"target"	str		"Trigger name of target"
	"sounds"	multiple_sounds	"Sound made when triggered"
	"wait"		int		"Delay before retrigger"
	"delay"		int		"Delay before action is triggered"
	"health"	int		"if > 1, must be killed to trigger, if == 0, walk-over trigger"
	"message"	str		"String displayed when triggered"
	"spawnflags"	notouch		""
	model
}

typedef "once_sounds"
{
	1	"Secret Sound"
	2	"Beep Beep"
	3	"Large Switch"
//	4	"Set message to text string"
}

entity "trigger_once" "Trigger->Once" "Triggers action only once"
{
	"killtarget"	str		"Kills something [for triggering monster events] (optional)"
	"target"	str		"Trigger name of target"
	"sounds"	once_sounds	"Sound made when triggered"
	"delay"		int		"Delay before action is triggered"
	"health"	int		"if > 1, must be killed to trigger, if == 0, walk-over trigger"
	"message"	str		"String displayed when triggered"
	"spawnflags"	notouch		""
	model
}

entity "trigger_onlyregistered" "Trigger->Only Registered" "Triggers only if game is registered (registered == 1)"
{
	"target"	str		"Trigger name of target"
	model
}

flagdef "push_flags"
{
	1	"Push once"
}

entity "trigger_push" "Trigger->Push" "Pushes a player in a direction (like a windtunnel)"
{
//	"origin"	notuser		"Where it is located"
	"speed"		int		"Force of the push"
	"angle"		int		"Direction player is pushed towards (-1=up -2=down, other=normal)"
	"spawnflags"	push_flags	""
	model
}

entity "trigger_relay" "Trigger->Relay" "Allows delayed/multiple actions from one trigger"
{
	"origin"	notuser		"Where it is located"
	"killtarget"	str		"Removes targeted entity (optional)"
	"targetname"	str		"Its trigger name"
	"target"	str		"Trigger name of its target"
	"delay"		int		"Delay before action is triggered"
	model
}

typedef "secret_sounds"
{
	1	"Secret Sound"
	2	"Beep Beep"
}

entity "trigger_secret" "Trigger->Secret" "Triggers action and awards secret credit."
{
	"killtarget"	str		"Kills something [for triggering monster events] (optional)"
	"target"	str		"Trigger name of target"
	"sounds"	secret_sounds	"Sound made when triggered"
	"wait"		int		"Delay before retrigger"
	"delay"		int		"Delay before action is triggered"
	"health"	int		"if > 1, must be killed to trigger, if == 0, walk-over trigger"
	"message"	str		"String displayed when triggered"
	"spawnflags"	notouch		""
	model
}

typedef "setskill"
{
	0	"easy"
	1	"normal"
	2	"hard"
	3	"nightmare"
}

entity "trigger_setskill" "Trigger->Set Skill" "Changes skill level"
{
	"message"	setskill	"Skill level to change to."
	model
}

flagdef "teleport_flags"
{
	1	"Only players can use teleport"
	2	"Silent teleport"
}

entity "trigger_teleport" "Trigger->Teleport" "Teleport (all trigger_ keys are triggered by walkover)"
{
	"target"	str		"Teleport destination name to teleport to."
	"targetname"	str 		"If present, only teleports when triggered, not when touched."
	"spawnflags"	teleport_flags	""
	model
}


// -------------------------------------------------------------------------
// weapons

entity "weapon_supershotgun" "Weapon->Super Shotgun" "Super Shotgun"
{
	"origin"	notuser
}

entity "weapon_nailgun" "Weapon->Nail Gun" "Perforator"
{
	"origin"	notuser
}

entity "weapon_supernailgun" "Weapon->Super Nail Gun" "Super Perforator"
{
	"origin"	notuser
}

entity "weapon_grenadelauncher" "Weapon->Grenade Launcher" "Grenade Launcher"
{
	"origin"	notuser
}

entity "weapon_rocketlauncher" "Weapon->Rocket Launcher" "Rocket Launcher"
{
	"origin"	notuser
}

entity "weapon_lightning" "Weapon->Lightning Gun" "Lightning Gun"
{
	"origin"	notuser
}
